package mx.iteso.comp.logo;

	import mx.iteso.comp.logo.node.AFalseGboolean;
	import mx.iteso.comp.logo.node.ATrueGboolean;
	import mx.iteso.comp.logo.node.AVarGboolean;
	import mx.iteso.comp.logo.node.PGboolean;

	public class Boolean  {
		
		public static boolean getBoolean(PGboolean node)
		{
			if (node instanceof ATrueGboolean)
				return true;
			else if (node instanceof AFalseGboolean)
				return false;
			else
			{
				String var1 = "";
				if (Conector.getVariables().get(((AVarGboolean)node).getIdentifier().getText())!= null)
					var1 = Conector.getVariables().get(((AVarGboolean)node).getIdentifier().getText()).toString();
			
				if (var1.trim().equalsIgnoreCase("true"))
		   			return true;
			}
			return false;
		}

			
	}

